home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / DragDestination.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  1.3 KB  |  37 lines  |  [TEXT/CWIE]

  1. // DragDestination.java
  2. // By Ned Etcode
  3. // Copyright 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7. /** Interface for objects interested in receiving dragged objects.
  8.   * A DragSession, an object representing the object currently being dragged
  9.   * and managing the modal drag session itself, calls these methods at various
  10.   * times during a drag session.  The current DragDestination is the object
  11.   * returned by the <b>acceptsDrag()</b> method of the View currently under the
  12.   * mouse.
  13.   * @see View#acceptsDrag
  14.   * @see DragSession
  15.   */
  16. public interface DragDestination {
  17.     /** Called when the user drags an object into a View.  The receiver should
  18.       * return <b>true</b> if it would accept the object if the user released
  19.       * it at its current location.
  20.       */
  21.     public boolean dragEntered(DragSession session);
  22.  
  23.     /** Called when the user drags an object within a View.  The receiver
  24.       * should return <b>true</b> if it would accept the object if the user
  25.       * released it at its current location.
  26.       */
  27.     public boolean dragMoved(DragSession session);
  28.  
  29.     /** Called when the user drags an object out of a View.
  30.       */
  31.     public void dragExited(DragSession session);
  32.  
  33.     /** Called when the user drops an object on a View.
  34.       */
  35.     public boolean dragDropped(DragSession session);
  36. }
  37.